import 'package:ceramics/extensions/ab_widget_extensions.dart';
import 'package:ceramics/styles/ab_styles.dart';
import 'package:ceramics/widgets/ab_elevate_button.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:shared_preferences/shared_preferences.dart';

class WelcomeDialog extends StatelessWidget {
  const WelcomeDialog({super.key});

  @override
  Widget build(BuildContext context) {
    return Dialog(
      backgroundColor: Colors.transparent,
      child: Column(
        mainAxisSize: MainAxisSize.min,
        children: [
          Stack(
            children: [
              Image.asset('images/welcome_bg.png'),
              Positioned(
                  bottom: 25,
                  left: 10,right: 10,
                  child: Text('Welcome to view the recommended list of famous attractions! Let’s give thumbs up to the exciting and fun rafting attractions!'.tr,textAlign: TextAlign.center,style: const TextStyle(color: ABStyles.darkBlack,fontSize: 15,height: 1.5))),
            ],
          ),
          ABElevateButton(child: Text('OK'.tr), onPressed: () async {
            var sp = await SharedPreferences.getInstance();
            sp.setBool('firstOpenHome', false);
            Get.back();
          }).size(width: 150)
          .paddingSymmetric(horizontal: 20,vertical: 10)
        ],
      ),
    );
  }
}